function GetFlowReport() {

    var store = new Ext.data.JsonStore({
        fields: [{name: 'ip'},{name: 'x',type: 'int'}],
        data: [
        {ip: '192.168.1.1',x: 5},
        {ip: '192.168.1.2',x: 3},
        {ip: '192.168.1.3',x: 4},
        {ip: '192.168.1.4',x: 5},
        {ip: '192.168.1.5',x: 6},
        {ip: '192.168.1.6',x: 7},
        {ip: '192.168.1.7',x: 8},
        {ip: '192.168.1.8',x: 8}
        ]
    })

	var flowPanel = new Ext.Panel({
				width : 800,
				height : 600,
				region : 'center',
				layout : 'fit',
				split : true,

				items : {
					    xtype: 'stackedcolumnchart',
					    store: store,
					    xField: 'ip',
					    xAxis: new Ext.chart.CategoryAxis({
					        title: 'IP地址'
					    }),
					    yAxis: new Ext.chart.NumericAxis({
					        title: "流量(MB)"
					    }),
					    series: [{
					        displayName: "流量",
					        yField: 'x'
					    }],
					    chartStyle: {
					        padding: 10,
					        legend: {
					            display: 'right'
					        }
					    }
				},
				tbar : [{
							text : '统计条件',
							tooltip : '统计条件',
							iconCls : 'refresh',
							handler : function() {							
								FlowReportSearchWindows(SearchReturn);
							}
						}]
			});
	function SearchReturn(data){
		var jsondata = Ext.util.JSON.decode(data);
		
	}

	return flowPanel;
}

function FlowReportSearchWindows(SearchReturn){

		var states2 = [
		['1', 'ALL'],
		['2', 'TCP'],
		['3', 'UDP']
		];
		

	var Search = new Ext.form.FormPanel({
				frame : true,
				layout : 'form',
				region : 'center',
				xtype : 'fieldset',
				bodyStyle : 'padding:0px;',
				items : [
							new Ext.form.CompositeField({ 
							    fieldLabel: '时间范围', 
							    items: [ 
							    		{ 
							            xtype: 'checkbox',
													name: 'time',
													id  : 'time'
							        },
							        new Ext.form.TextField({ 
										    name: 'my_field', 
										    flex: 1 
										  }),{
															xtype: 'label',
															style:'padding-top: 5px; ', 
															text:'~'
											},new Ext.form.TextField({ 
													    name: 'my_field', 
													    flex: 1 
											}) 
							         
							    	] 
							}),new Ext.form.CompositeField({ 
							    fieldLabel: '本地子网', 
							    items: [ 
							    		{ 
							            xtype: 'checkbox',
													name: 'srcsubnet',
													id  : 'srcsubnet'
							        },
							        new Ext.form.TextField({ 
										    name: 'my_field', 
										    flex: 1 
										  })
							         
							    	] 
							}),new Ext.form.CompositeField({ 
							    fieldLabel: '本地子网掩码', 
							    items: [ 
							    		{ 
							            xtype: 'checkbox',
													name: 'srcsubnetmask',
													id  : 'srcsubnetmask'
							        },
							        new Ext.form.TextField({ 
										    name: 'my_field', 
										    flex: 1 
										  })
							         
							    	] 
							}),new Ext.form.CompositeField({ 
							    fieldLabel: '本地端口范围', 
							    items: [ 
							    		{ 
							            xtype: 'checkbox',
													name: 'srcports',
													id  : 'srcports'
							        },
							        new Ext.form.TextField({ 
										    name: 'my_field', 
										    flex: 1 
										  }),{
															xtype: 'label',
															style:'padding-top: 5px; ', 
															text:'~'
											},new Ext.form.TextField({ 
													    name: 'my_field', 
													    flex: 1 
											}) 
							         
							    	] 
							}),new Ext.form.CompositeField({ 
							    fieldLabel: '对方子网', 
							    items: [ 
							    		{ 
							            xtype: 'checkbox',
													name: 'destsubnet',
													id  : 'destsubnet'
							        },
							        new Ext.form.TextField({ 
										    name: 'my_field', 
										    flex: 1 
										  })
							         
							    	] 
							}),new Ext.form.CompositeField({ 
							    fieldLabel: '对方子网掩码', 
							    items: [ 
							    		{ 
							            xtype: 'checkbox',
													name: 'destsubnetmask',
													id  : 'destsubnetmask'
							        },
							        new Ext.form.TextField({ 
										    name: 'my_field', 
										    flex: 1 
										  })
							         
							    	] 
							}),new Ext.form.CompositeField({ 
							    fieldLabel: '对方端口范围', 
							    items: [ 
							    		{ 
							            xtype: 'checkbox',
													name: 'destports',
													id  : 'destports'
							        },
							        new Ext.form.TextField({ 
										    name: 'my_field', 
										    flex: 1 
										  }),{
															xtype: 'label',
															style:'padding-top: 5px; ', 
															text:'~'
											},new Ext.form.TextField({ 
													    name: 'my_field', 
													    flex: 1 
											}) 
							         
							    	] 
							}),{
								fieldLabel: '协议',
								xtype : 'combo',
								name : 'protocol1',
								frame : true,
								id : 'protocol1',
								store : new Ext.data.ArrayStore({
										fields : ['abbr', 'state'],
										data : states2
									}),
								valueField : 'abbr',
								displayField : 'state',
								typeAhead : true,
								mode : 'local',
								triggerAction : 'all',
								value : '1',
								editable : false,
								anchor: '100%'
						}
						]

			});


	var searchWindows = new Ext.Window({
				layout : 'border',
				width : 500,
				height : 410,
				title : "查找",
				modal : true,
				resizable : true,
				maximizable : true,
				iconCls : 'search',
				items : [Search],
				plain : true
			});
	searchWindows.addButton({
				text : "查找",
				handler : function() {
					var data = "{startdate:'" + Ext.get("startdate").getValue() + "',enddate:'" + Ext.get("enddate").getValue() + "',context:'" + Ext.get("context").getValue() + "'}";
					SearchReturn(data)
					searchWindows.close();
				}
			});
	searchWindows.addButton({
				text : '取 消',
				handler : function() {
					searchWindows.close();
				}
			});
	searchWindows.show();
}